package com.rf.richfitwheel.workflow.dao;

import java.util.List;
import java.util.Map;

import com.rf.richfitwheel.workflow.entity.Delegation;

public interface DelegationDao {

	int addDelegation(Delegation delegation);

	int  updateDelegation(Delegation delegation);

	Delegation findById(String id);

	int deleteDelegation(String id);

	List<Delegation> getDelegationByUserId(Delegation delegation);
	
	List<Map<String, Object>> selectPageByPar(Delegation delegation);
	/**
	 * 统计记录数量
	 *
	 * @param delegation
	 * @return
	 */
	Integer count(Delegation delegation);

	/**
	 * 根据用户id和时间查询授权记录
	 * @param pp
	 * @return
	 */
    List<Map<String, Object>> getDelegationByUserIdAndTime(Map<String, Object> pp);
}
